Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve featured image flow #23962

Merged
merged 39 commits into from
Jan 9, 2025
Merged

Conversation

kean
Copy link
Contributor

@kean kean commented Jan 8, 2025

This PR reworks the Objective-C-based "Set Featured Image" flow in SwiftUI and introduces a few enhancements. The new implementation now completely isolated from the view controller and fits in a single file, so it's easy to follow.

Changes

  • Fix layout of “Set Featured Image” button (the height was incorrect)
  • Add a "More" menu for quick access to edit actions
  • Add a quick way to "Replace" an image
  • Add zoom transition

Technical Notes

This PR introduces new MediaPicker component for managing media sources from SwiftUI. It builds on top of the existing MediaPickerMenu, but provides a higher-level API:

 let configuration = MediaPickerConfiguration(
    sources: [.photos, .camera, .playground, .siteMedia(blog: post.blog)],
    filter: .images
)
MediaPicker(configuration: configuration, onSelection: { selection in /* ... /* ) {
    Label("Select Image", systemImage: "photo.badge.plus")
}

It also introduces SiteMediaImageView (UIKit) and SiteMediaImage (UIKit) to simplify rendering thumbnails for site media images.

Screenshots

Screen.Recording.2025-01-09.at.11.58.36.AM.mov

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so)

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean added this to the 25.7 milestone Jan 8, 2025
@dangermattic
Copy link
Collaborator

dangermattic commented Jan 8, 2025

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@kean kean marked this pull request as draft January 8, 2025 20:08
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 8, 2025

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23962-f44329d
Version25.6
Bundle IDorg.wordpress.alpha
Commitf44329d
App Center BuildWPiOS - One-Offs #11315
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Jan 8, 2025

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23962-f44329d
Version25.6
Bundle IDcom.jetpack.alpha
Commitf44329d
App Center Buildjetpack-installable-builds #10348
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean mentioned this pull request Jan 9, 2025
14 tasks
@kean kean marked this pull request as ready for review January 9, 2025 17:05
@kean kean merged commit cd13f63 into christmas-feature-branch Jan 9, 2025
6 of 22 checks passed
@kean kean deleted the task/featured-image-replace branch January 9, 2025 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants